﻿using Gx.Dal.Manage;
using Gx.Model.Entity;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace Dal.Test
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
            LKCustomerDal dal = new LKCustomerDal();

            /*
                     [Column("CustomerName")]
        public string CustomerName { get; set; }
        [Column("CustomerCode")]
        public string CustomerCode { get; set; }
        [Column("CustomerLevelId")]
        public int CustomerLevelId { get; set; }
        [Column("Balance")]
        public decimal Balance { get; set; }
        [Column("Mobile")]
        public string Mobile { get; set; }
        [Column("Telephone")]
        public string Telephone { get; set; }
        [Column("QQ")]
        public string Qq { get; set; }
        [Column("WeChat")]
        public string WeChat { get; set; }
        [Column("Region")]
        public string Region { get; set; }
        [Column("Address")]
        public string Address { get; set; }
        [Column("Remark")]
        public string Remark { get; set; }
        [Column("Tag")]
        public string Tag { get; set; }
        [Column("IsBindWeChat")]
        public bool IsBindWeChat { get; set; }
        [Column("WxOpenId")]
        public string WxOpenId { get; set; }
        [Column("IsValid")]
        public bool IsValid { get; set; }
        [Column("CreateTime")]
        public System.DateTime CreateTime { get; set; }
        [Column("CreateUserId")]
        public int CreateUserId { get; set; }
        [Column("CreateUser")]
        public string CreateUser { get; set; }
        [Column("ModifyUserId")]
        public int ModifyUserId { get; set; }
        [Column("ModifyUser")]
        public string ModifyUser { get; set; }
        [Column("ModifyTime")]
        public System.DateTime ModifyTime { get; set; }
             */

            //给LKCustomer表添加一条数据
           var lk=new LKCustomer()
           {
                CreateTime = DateTime.Now,
                CreateUser = "admin",
                CustomerName = "test",
                CreateUserId = 1,
                CustomerCode = "test",
                CustomerLevelId = 1,
                CustomerLevelName = "test",
                IsBindWeChat = true,
                WeChat = "test",
                WxOpenId = "test",
                IsValid = true,
                Balance = 0,
                Mobile = "test",
                Telephone = "test",
                Qq = "test",
                Region = "test",
                Address = "test",
                Remark = "test",
                Tag = "test",
                ModifyTime = DateTime.Now,
                ModifyUser = "admin",
                ModifyUserId = 1
            };
            //dal.Insert(lk);//AddCustomer(lk);
        }

        [TestMethod]
        public void TestMethod2()
        {
            LKCustomerDal dal = new LKCustomerDal();
            var lk = new LKCustomer()
            {
                CreateTime = DateTime.Now,
                CreateUser = "admin",
                CustomerName = "test",
                CreateUserId = 1,
                CustomerCode = "test",
                CustomerLevelId = 1,
                CustomerLevelName = "test",
                IsBindWeChat = true,
                WeChat = "test",
                WxOpenId = "test",
                IsValid = true,
                Balance = 0,
                Mobile = "test",
                Telephone = "test",
                Qq = "test",
                Region = "test",
                Address = "test",
                Remark = "test",
                Tag = "test",
                ModifyTime = DateTime.Now,
                ModifyUser = "admin",
                ModifyUserId = 1
            };
            //dal.Insert(lk);
            //lk.CustomerName = "test2";
            //dal.Update(lk);
        }
    }
}
